package cn.silver.module.configuration.param;

import cn.silver.framework.core.validate.AddGroup;
import cn.silver.framework.core.validate.EditGroup;
import cn.silver.framework.core.validate.QueryGroup;
import cn.silver.framework.mybatis.annotation.TableField;
import cn.silver.framework.mybatis.enums.SearchEnums;
import cn.silver.framework.mybatis.param.BusParam;
import cn.silver.module.configuration.domain.SysDictItem;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 字典数据业务对象 sys_dict_data
 *
 * @author Michelle.Chung
 */

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysDictItem.class, reverseConvertGenerate = false)
public class DictItemParam extends BusParam {
    /**
     * 字典类型
     */
    @TableField(name = "type", searchType = SearchEnums.EQ)
    @Size(min = 0, max = 32, message = "字典类型长度不能超过{max}个字符")
    @NotBlank(message = "字典类型不能为空", groups = {QueryGroup.class, AddGroup.class, EditGroup.class})
    private String type;
}
